import { useState } from "react";

function Next() {
  const [value, setValue] = useState("ddd");
  console.log('获取input的值', value)
  
  return (
    <div>
      <h4 style={{ color: "blue", fontSize: "14px" }}>子组件2：双向绑定数据，生命周期钩子</h4>
      <br />
      <input
        value={value}
        onChange={(e) => setValue(e.target.value)}
        type="text"
      ></input>
    </div>
  );
}
export default Next;
